void funs(int &)
{
	cout << "l constructor" << endl;
}


void funs(int &&)
{
	cout << "r constructor" << endl;
}

struct TestArg
{
	TestArg(int && a)
	{
		cout << "r constructor" << endl;
	}
	TestArg(int & a)
	{
		cout << "l constructor" << endl;
	}

	TestArg()
	{
		cout << "no args" << endl;
	}
	TestArg(int a,int b)
	{
		cout << a <<","<<b<< endl;
	}

};

vector<TestArg > vvs;
template <class... T>
void f(T &&... args)
{
	//cout << sizeof...(args) << endl; //打印变参的个数
	vvs.push_back(TestArg(args...));
	//vvs.push_back(TestArg(std::forward<T>(args)...));  //这里用要完美转发功效的前提是 T是 &&  可以引用折叠
}




int main()
{

	
	int a = 1;
	f();        //0
	f(1);    //2
	f(a);    //2
	f(1, 2);
